<template>
  <div class="wallet_details_page">
    <div class="titleMessage">订单详情</div>
    <Details :orderId="orderId"></Details>
    <div class="titleMessage">日志信息</div>
    <div class="order_container">
      <el-table :data="order_details" style="width: 100%">
        <el-table-column prop="createTime" label="日期" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.createTime | fiter_date}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="operate" label="operate" width="150"></el-table-column>
        <el-table-column prop="remark" label="remark" ></el-table-column>
      </el-table>
    </div>
    
  </div>
</template>


<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import Search from "./search.vue";
import { State, Getter, Action, Mutation } from "vuex-class";
import axios from "axios";
import { AxiosPromise } from "axios";
import tools from "@/server/tools";
import Details from "./Details.vue"
const namespace: string = "order_mrg";
@Component({
  components: {
    Search,
    Details
  },
  filters: {
    fiter_date(time:any){
      return tools.getTime(time)
    }
  }
})
export default class Ordermrg extends Vue {
  @Getter("get_details", { namespace }) order_details: any;
  @Action("get_order_details", { namespace }) get_order_details: any;
  private orderId: string = ''
  handleEdit = (index: any, row: any) => {
    console.log("handleEdit:", index, row);
  };

  handleDelete = (index: any, row: any) => {
    console.log("handleDelete:", index, row);
  };

  created () {
    this.orderId = this.$route.params.orderId
  }

  activated () {
    this.orderId = this.$route.params.orderId
    this.get_order_details({orderId: this.$route.params.orderId})
    // this.get_order_details({orderId: "cec8c9dd3ef24713b5f51a56627d4851"})
  }

  mounted() {
   
  }
}
</script>
<style scoped lang="scss">
.wallet_details_page {
  margin: 0 auto;
  .titleMessage{
    height:50px;
    line-height:50px;
    background: #eee;
  }
  .search_parent {
    position: fixed;
    width: 100%;
    height: 50px;
    /* left: 0; */
    z-index: 100;
    margin-top: 0px;
    /* top: 0px; */
  }
  .order_container {
    padding-top: 5px;
  }
}
</style>